-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Fix ViewTransition crash in Mobile Safari #35337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Comparing: 55480b4...95d7331 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
sebmarkbage
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is probably ok.
|
Not sure if it fixes it in all cases though if the staleness also happens to apply to any of these. |
|
Yea not sure, I guess let's try it and see if I can hit it again at some other codepath |
Speculative fix to facebook#35336 written by Claude. I have verified that applying a similar patch locally to the repro from facebook#35336 does fix the crash. I'm not familiar enough with the underlying APIs to tell whether the fix is correct or sufficient. DiffTrain build for [61331f3](facebook@61331f3)
|
One unfortunate consequence of this is that if you spawn custom Animations using the refs passed to |
Follow up to #35337. During a gesture, we always cancel the original animation and create a new one that we control. That's the one we need to add to the set that needs to be cancelled. Otherwise future gestures hang. An unfortunate consequence is that any custom ones that you start e.g. with #35556 or through other means aren't automatically cleaned up (in fact there's not even a clean up callback yet). This can lead these to freeze the whole UI afterwards. It would be really good to get this fixed in browsers instead so we can revert #35337.
…ts (#35564) Stacked on #35556 and #35559. Given that we don't automatically clean up all view transition animations since #35337 and browsers are buggy, it's important that you clean up any `Animation` started manually from the events. However, there was no clean up function for when the View Transition is forced to stop. This also makes it harder to clean up custom timers etc too. This lets you return a clean up function from all the events on `<ViewTransition>`.
…ts (#35564) Stacked on #35556 and #35559. Given that we don't automatically clean up all view transition animations since #35337 and browsers are buggy, it's important that you clean up any `Animation` started manually from the events. However, there was no clean up function for when the View Transition is forced to stop. This also makes it harder to clean up custom timers etc too. This lets you return a clean up function from all the events on `<ViewTransition>`. DiffTrain build for [c55ffb5](c55ffb5)
Speculative fix to #35336 written by Claude.
I have verified that applying a similar patch locally to the repro from #35336 does fix the crash.
I'm not familiar enough with the underlying APIs to tell whether the fix is correct or sufficient.